font-weight: bold;
}
-.message-dialog-subtitle {
+.message-dialog-description {
color: $fg_color;
font-weight: bold;
}
var AccessDialog = GObject.registerClass(
class AccessDialog extends ModalDialog.ModalDialog {
- _init(invocation, handle, title, subtitle, body, options) {
+ _init(invocation, handle, title, description, body, options) {
super._init({ styleClass: 'access-dialog' });
this._invocation = invocation;
for (let option in options)
options[option] = options[option].deep_unpack();
- this._buildLayout(title, subtitle, body, options);
+ this._buildLayout(title, description, body, options);
}
- _buildLayout(title, subtitle, body, options) {
+ _buildLayout(title, description, body, options) {
// No support for non-modal system dialogs, so ignore the option
// let modal = options['modal'] || true;
let denyLabel = options['deny_label'] || _("Deny Access");
let grantLabel = options['grant_label'] || _("Grant Access");
let choices = options['choices'] || [];
- let contentParams = { title, subtitle, body };
+ let contentParams = { title, description, body };
let content = new Dialog.MessageDialogContent(contentParams);
this.contentLayout.add_actor(content);
return;
}
- let [handle, appId, parentWindow_, title, subtitle, body, options] = params;
+ let [handle, appId, parentWindow_, title, description, body, options] = params;
// We probably want to use parentWindow and global.display.focus_window
// for this check in the future
if (appId && `${appId}.desktop` != this._windowTracker.focus_app.id) {
return;
}
- let dialog = new AccessDialog(invocation, handle, title,
- subtitle, body, options);
+ let dialog = new AccessDialog(
+ invocation, handle, title, description, body, options);
dialog.open();
dialog.connect('closed', () => (this._accessDialog = null));
/* Translators: %s is an application name */
let title = _("“%s” is not responding.").format(windowApp.get_name());
- let subtitle = _("You may choose to wait a short while for it to " +
- "continue or force the application to quit entirely.");
- return new Dialog.MessageDialogContent({ title, subtitle });
+ let description = _('You may choose to wait a short while for it to ' +
+ 'continue or force the application to quit entirely.');
+ return new Dialog.MessageDialogContent({ title, description });
}
_updateScale() {
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
null),
- 'subtitle': GObject.ParamSpec.string(
- 'subtitle', 'subtitle', 'subtitle',
+ 'description': GObject.ParamSpec.string(
+ 'description', 'description', 'description',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
null),
}, class MessageDialogContent extends St.BoxLayout {
_init(params) {
this._title = new St.Label();
- this._subtitle = new St.Label();
+ this._description = new St.Label();
this._body = new St.Label();
- ['title', 'subtitle', 'body'].forEach(prop => {
+ ['title', 'description', 'body'].forEach(prop => {
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
});
ellipsize: Pango.EllipsizeMode.NONE,
line_wrap: true,
};
- this._subtitle.clutter_text.set(textProps);
+ this._description.clutter_text.set(textProps);
this._body.clutter_text.set(textProps);
let defaultParams = {
super._init(Object.assign(defaultParams, params));
this.add_child(this._title);
- this.add_child(this._subtitle);
+ this.add_child(this._description);
this.add_child(this._body);
}
return this._title.text;
}
- get subtitle() {
- return this._subtitle.text;
+ get description() {
+ return this._description.text;
}
get body() {
this._setLabel(this._title, 'title', title);
}
- set subtitle(subtitle) {
- this._setLabel(this._subtitle, 'subtitle', subtitle);
+ set description(description) {
+ this._setLabel(this._description, 'description', description);
}
set body(body) {
let restoreAccel = this._getRestoreAccel();
if (restoreAccel) {
- contentParams.subtitle =
+ contentParams.description =
/* Translators: %s is a keyboard shortcut like "Super+x" */
_("You can restore shortcuts by pressing %s.").format(restoreAccel);
}
var GeolocationDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
}, class GeolocationDialog extends ModalDialog.ModalDialog {
- _init(name, subtitle, reqAccuracyLevel) {
+ _init(name, description, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' });
this.reqAccuracyLevel = reqAccuracyLevel;
let title = _("Give %s access to your location?").format(name);
let body = _("Location access can be changed at any time from the privacy settings.");
- let contentParams = { title, subtitle, body };
+ let contentParams = { title, description, body };
let content = new Dialog.MessageDialogContent(contentParams);
this.contentLayout.add_actor(content);